#ifndef	__I2C_H__
#define	__I2C_H__

void I2CStart(void);
void I2CWriteData(BYTE value);
BYTE I2CReadData(void);
void I2CStop(void);
void I2Cdelay(void);

void I2CStartH(void);
void I2CWriteDataH(BYTE value);
//BYTE I2CReadDataH(void);
BYTE I2CReadDataH(void);
void I2CStopH(void);

void I2CStartL(void);
void I2CWriteDataL(BYTE value);
BYTE I2CReadDataL(void);
void I2CStopL(void);

extern	BYTE	xdata * data regTW88;

BYTE ReadI2C		(BYTE addr, BYTE index);
void WriteI2C		(BYTE addr, BYTE index, BYTE val);
void I2CWriteDataN(BYTE addr, BYTE index, BYTE *val, BYTE cnt);
void I2CWriteDataN2(BYTE addr, BYTE index, BYTE *val, WORD cnt);
void I2CDeviceInitialize(BYTE *RegSet, BYTE delay);
void WriteI2CArray(BYTE addr, BYTE *RegSet);


#endif	// __I2C_H__

